home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr47
/
altqb553.zip
/
HLPFILES.ZIP
/
WINDOWS.HLP
< prev
Wrap
Text File
|
1990-10-25
|
5KB
|
143 lines
┌────────────────────────────────────────────────────┐
│ WINDOWS │
└────────────────────────────────────────────────────┘
What are Windows? Well, if you've used the QuickBASIC
environment at all, then you've used Windows. When you
press <ALT><F> to bring down the File Menu, the list
of options presented there is in a window. Notice how
any characters which were concealed when the File Menu
appeared, are restored, intact, after you've made your
choice. Windows are areas of the screen which are used
to hold transient data and messages to the user. They
make the most of the limited display space available
and remove the need to constantly rebuild the screen,
each time your program communicates with the world.
Properly presented, windows can give the illusion of
multi-tasking, even on single-processor machines like
the Tandy 1000 and IBM-PC.
Nowadays, no program worth its' salt can be without a
window of some kind. If YOUR program is going to stand
out amongst all the others, however, they've got to be
done professionally. Windows must appear instantly and
vanish, just as quickly, when no longer required. They
must be as large or as small as is necessary, for the
data which you need to display, and you should have a
plentiful supply, for all the circumstances that your
program might encounter. BASIC, unfortunately, is just
not fast enough to meet all these requirements.
Looks like it'll have to be assembler again ...
The WINDOWS Library contains a set of 8088/8 Assembly
Language routines, which enable you include versatile
windowing features in your QuickBASIC programs.
To use WINDOWS, you must include two declarations at
the beginning of your program's source code:
DECLARE SUB PopUp (Y%, X%, H%, W%, A%, B%, S%, Z%)
DECLARE SUB ShutUp ()
You must also link WINDOWS.LIB to your compiled object
file, with the command
LINK yourprog,,,WINDOWS.LIB
When developing programs in the QuickBASIC environment
you can include WINDOWS in your Quick Library by using
the Linker instruction:
LINK /QU WINDOWER.OBJ ..., yourprog.QLB,,BQLB40.LIB;
(include whatever other .OBJ modules you need)
Then start up QuickBASIC with the command:
QB yourprog.bas /L yourprog.qlb
Thereafter, you can open windows from anywhere in your
program by issuing the statement:
PopUp P1%, P2%, P3%, P4%, P5%, P6%, P7%, P8%
Where: P1% is the top-left row co-ordinate
P2% is the top-left column co-ordinate
P3% is the height (in rows) of the window
P4% is the width (in columns) of the window
P5% is the display attribute or colour
P6% is the border style (0 = no border)
P7% is the shadow switch (0 = no shadow)
P8% is the zoom switch (0 = no zoom)
See the COLOURS topic for more information on screen
attributes and colours.
┌────────────────────────────────────────────────────┐
│ BORDER STYLES │
└────────────────────────────────────────────────────┘
┌────┐
│ 1. │ Single-lined box all round the window
└────┘
╔════╗
║ 2. ║ Double-lined box all round the window
╚════╝
╒════╕
│ 3. │ Single vertical, double horizontal
╘════╛
╓────╖
║ 4. ║ Single horizontal, double vertical
╙────╜
The SHADOW switch (Parameter 7), can be used to add a
black shadow underneath your window, Giving it a three
dimensional effect. Setting P7% to 1, puts the shadow
on the left-hand side. Setting P7% to 2 puts it on the
right. Any other value prevents shadow.
Setting Parameter 8 to 1 will cause the window to ZOOM
onto the screen. What this means is that, starting at
a point source, successively larger versions of the
window will be drawn until it is the size required.
The process is extremely fast and impressive, and adds
a very professional touch to your programs.
Before a window is opened, the display area below it
is copied to an internal buffer, from where it will be
eventually restored when the window is closed. This
buffer has a capacity of 8 KiloBytes, the equivalent
of two full screens. To calculate the storage required
for a particular window, use the formula:
Bytes = ((Height in rows * Width in columns) * 2) + 6
(add one row to the height and one column to the width
if you specify shadow)
The window area needs to be multiplied by 2 since each
screen character takes two bytes of memory, for itself
and its attribute code. The odd six bytes are required
for the storage of buffer pointers.
The window buffer works as a LIFO stack, so that the
last window opened is the first one to be removed. You
can close the current window with the statement:
CALL ShutUp
To put text inside a window, use the fast screen print
routines from the ASSEMBLY Library. This library also
has a pair of routines, SCROLLUP and SCROLLDOWN, which
you can use to clear all or part of an open window.
┌────────────────────────────────────────────────────┐
│ (c) 1988 By Christy Gemmell and Singular SoftWare. │
└────────────────────────────────────────────────────┘